#
import wsgiref.handlers

import webapp2 #2
from views import *

application = webapp2.WSGIApplication([
  webapp2.Route(r'/<lang:en|ru|$>', MainPage),
  webapp2.Route(r'/<lang:en|ru>/settings', SettingsPage),
  webapp2.Route(r'/<lang:en|ru>/settings/submit', SettingsPageSubmit),
  webapp2.Route(r'/<lang:en|ru>/stats', Stats),
  webapp2.Route(r'/<lang:en|ru>/save-lang', SaveLang),
  ('/stats/data', StatsData),

  webapp2.Route(r'/worker/get', WorkerGet),
  webapp2.Route(r'/worker/go-work', WorkerGo_work),
  webapp2.Route(r'/worker/go-relax', WorkerGo_relax)
], debug=True)


def main():
  wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__':
  main()
